From b4470c47ca90f251acbf9b22f92769e4218585cf Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 13 Mar 2004 08:11:08 +0000 Subject: [PATCH] Fix caption alignment for RTL langs --- includes/Skin.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index f4bf219f08..2230d663a8 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1644,7 +1644,7 @@ class Skin { } function makeThumbLinkObj( $nt, $label = "", $align = "right", $boxwidth = 180 ) { - global $wgUploadPath; + global $wgUploadPath, $wgLang; $name = $nt->getDBKey(); $image = Title::makeTitle( Namespace::getImage(), $name ); $url = wfImageUrl( $name ); @@ -1670,7 +1670,9 @@ class Skin { $u = $nt->escapeLocalURL(); - $more = htmlspecialchars(wfMsg( "thumbnail-more" )); + $more = htmlspecialchars( wfMsg( "thumbnail-more" ) ); + $magnifyalign = $wgLang->isRTL() ? "left" : "right"; + $textalign = $wgLang->isRTL() ? " style=\"text-align:right\"" : ""; $s = "
"; if ( $thumbUrl == "" ) { @@ -1681,9 +1683,9 @@ class Skin { " width=\"{$boxwidth}\" height=\"{$boxheight}\">" . "" . "\"{$more}\""; + " width=\"26\" height=\"24\" align=\"{$magnifyalign}\" alt=\"{$more}\">"; } - $s .= "

{$label}

"; + $s .= "{$label}

"; return $s; } -- 2.20.1